import React from 'react'
import { Button } from 'antd';
import { useXFlowApp } from '@antv/xflow'

const CCButton = () => {
    const app = useXFlowApp()

    const onClick = async () => {
        console.log('获取流程图', await app.getGraphData());
    }

    return (
        <Button
            type="primary"
            onClick={onClick}
            style={{
                position: 'absolute',
                zIndex: 999,
            }}
        >
            获取流程图
        </Button>
    )
}

export default CCButton